package com.amrit.threads;


public class ThreadRunnable implements Runnable{

	private final int delay;

	public ThreadRunnable(String label, int d) {
		// Give this particular thread a
		//   name:  "thread 'LABEL'".
		super();
		delay = d;
	}

	@Override
	public void run() {

		for (int count = 1, row = 1; row < 5; row++, count++) {
			try {
				System.out.println("Inside run() of MyThread - " + count);
				//System.out.format("_-_-_", count);
				Thread.currentThread();
				Thread.sleep(delay);
			}
			catch (InterruptedException ie) {
				// This would be a surprise.
			}
		}

	}
}
